/**
 *
 */
package com.senken.commons.shiro;

import java.io.Serializable;
import java.util.List;

/**
 * @description：自定义Authentication对象，使得Subject除了携带用户的登录名外还可以携带更多信息
 * @author：zhixuan.wang
 * @date：2015/10/1 14:51
 */
public class ShiroUser implements Serializable {

    private static final long serialVersionUID = -1373760761780840081L;
    public int id;
    public String loginName;
    public String nickName;
    public List<Integer> roleList;

    public ShiroUser(int integer, String loginName, List<Integer> roleList,String nickName) {
        this.id = integer;
        this.loginName = loginName;
        this.roleList = roleList;
        this.nickName = nickName;
    }


    /**
     * 本函数输出将作为默认的<shiro:principal/>输出.
     */
    @Override
    public String toString() {
        return nickName;
    }
}